package MethodApplication.MethodDemo5;

public class demo1 {
    public static void method11(String name,PersonInterface p){
        Person person = p.BuildPerson(name);
        System.out.println(person.getName());
    }

    public static void main(String[] args) {
        method11("迪丽热巴",(String name)->{
            return new Person(name);
        });
        //引用类的构造器的方法引用
        method11("古力娜扎",Person::new);
    }
}
